package com.amiu.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.amiu.Bean;
import com.amiu.autoMybatis.test.mapper.DaoMapper;
@Service
public class Dao1Service {
	@Autowired DaoMapper dao;
	public Bean findById(long id){
		return dao.findById(id);
	}

	public List<Bean> findByPhone(long phone){
		return dao.findByPhone(phone);
	}
	
	public Map<Long, Bean> findByName(String name){
		return dao.findByName(name);
	}
	
	public int insert(Bean bean){
		return dao.insert(bean);
	}
	
	public void deleteById(long id){
		dao.deleteById(id);
	}
	
	public void updateById(Bean bean){
		dao.updateById(bean);
	}
}
